<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>注册</title>
		<link rel="stylesheet" href="../css/注册.css" />
		<script src="../js/jquery-1.11.3.min.js"></script>
	</head> 
	<body>
		<div class="wrap">
			<div class="head">
				<div class="top">
					<img src="../img/login (1).jpg" alt="">
					<span>已有帐号？<a href="../html/登录.html" style="color:#ff6600;">请登录</a></span>
				</div>
			</div>
			<div class="con">
				<div class="conss">
		         	<img src="../img/登录12-23_02_02.jpg" alt="">
				</div>
		         <div class="cons">
		         		<div class="imgs">
		         			<img src="../img/login (2).jpg" alt="" />
		         		</div>
		         		<div class="inp" id="inp">
		         			<img src="../img/denglu (3).jpg" alt="" />
		         			<input type="text" id="phone" placeholder="请输入手机号码"/>
		         		</div>
		         		<div class="inp2" id="inp">
		         			<div class="inp2_left">
		         				<img src="../img/denglu (1).jpg" alt="" />
		         				<input type="text" id="num" placeholder="请输入手机验证码"/>
		         			</div>
		         			<div class="inp2_right" id="btn">
		         				<p>获取验证码</p>
		         			</div>
		         		</div>
		         		<div class="inp" id="inp">
		         			<img src="../img/注册12-23_03.jpg" alt="" />
		         			<input type="password" name="password" id="password" onblur="passwordBlur()" placeholder="请输入密码"/>
							<input type="text" id="text" style="display:none" onblur="textBlur()" placeholder="请输入密码"/>
		         			<img onclick="xyPassword()" style="width:20px;height:12px;float: right;margin:12px 10px 0 0;" src="images/注册12-23_06.jpg" alt="" />
		         			</div>
		         		<div class="inp" id="inp">
		         			<img src="../img/denglu (5).jpg" alt="" />
		         			<input type="text" placeholder="请输入图片验证码"/>
		         			<img style="width:68px;height:25px" src="images/denglu (4).jpg" alt="" />
		         			<a href="#" style="color:#0099ff;text-decoration: underline;">换一张</a>
		         		</div>
			         	<div class="yan">
			         		<img src="../img/denglu (7).jpg" alt="" />
			         		<span class="ziti">验证码输入错误</span>
			         	</div>
			         	<div class="anniu">
			         		<a href="首页.html" style="color:#ffffff;">注册</a>
			         	</div>
			         	<p class="foo">注册视为同意<a href="#" style="color:#ff6600;">《讯丰数字资产管理用户协议》</a></p>
		         </div>
		      </div>
			<div class="foot">
				<p>广西讯丰数字资产管理有限公司 版权所有 桂|CP备14005382号</p>
			</div>
		</div>
		<script>
			
//				获取焦点inp变色
					$("#inp input").focus(function(){
						$(this).parent().css("border","1px solid #FF6600");
	
					}).blur(function(){
						$(this).parent().css("border","1px solid #cccccc");
					});
				
				
			
//				判断手机号码
					$("#phone").focus(function(){
						if($('#phone').val().length == 0) {
						  	$(".ziti").html("手机号没有输入")			 	
						} else if(!(/^1[34578]\d{9}$/.test($('#phone')))){
							$(".ziti").html("手机号码不正确")				   		
						  	
						}		
					})
						

				
				
		
//				获取验证码
					function rand(min,max) { 
						return Math.floor(Math.random()*(max-min))+min;   
					}     
					$("#btn").click(function(){     
						var randnum=rand(1000,9999); 
						$("#num").val(randnum);
					})

				
//				小眼睛
				//点击多选框切换text和password的隐藏和显示
					function xyPassword() {
					$("#text").toggle();
					$("#password").toggle();
					}
					//text框失去焦点把text框的值赋值给password框
					function textBlur() {
					$("#password").val($("#text").val());
					}
					
					//password框失去焦点把password框的值赋值给text框
					function passwordBlur() {
					$("#text").val($("#password").val());
					}
			
			
			
			
			
		</script>
	</body>
</html>
